package com.kuizii.discovery.net;

import com.kuizii.discovery.client.DiscoveryProperties;
import com.kuizii.common.LiteServiceRegistration;

import java.util.List;

public interface IOManager {

    void init(DiscoveryProperties discoveryProperties);

    /**
     * 注册服务
     *
     * @param instance
     */
    void registerService(LiteServiceRegistration instance);

    /**
     * 卸载服务
     *
     * @param serviceName
     * @param instance
     */
    void deregisterService(String serviceName, LiteServiceRegistration instance);

    /**
     * 刷新服务信息
     *
     * @param serviceName
     * @param instance
     */
    void refreshService(String serviceName, LiteServiceRegistration instance);

    void destroy();

    List getServerList();
}
